var TextureManager = Class.extend({
	init: function() {
		this.textureRegistry = [];
	},
	
	registerTexture: function(context, textureName, url) {
		this.textureRegistry[textureName] = new Texture(context, textureName, url);
	},
	
	getTexture: function(textureName) {
		var texture = this.textureRegistry[textureName];
		if (!texture) {
			throw new Error("Undefined texture: " + textureName);
		}
		return texture;
	},
}); 
